<div class="available-items">
	@if($items->isEmpty())
		<div>
			Ningún item concuerda con su criterio de búsqueda.
		</div>
	@else
		@foreach($items as $item)
			<div class="item" id="item_{{$item->pk}}">
				<div class="info">
					<div class="reference"><span class="label">Referencia: </span>{{$item->reference}}</div>
					<div class="name"><span class="label">Nombre: </span>{{$item->name}}</div>
					<div class="amount"><span class="label">En stock: </span><span class="value">{{$item->amount}}</span></div>
					<div class="price"><span class="label">Precio: </span><span class="value">{{$item->formattedPrice()}}</span></div>
					<div class="request-type-container">
						<span class="label">Tipo de pedido: </span>
						<select class="request-type">
						@foreach(ItemRequestType::all() as $type)
							<option value="{{$type->pk}}">{{$type->description}}</option>
						@endforeach
						</select>
					</div>
					<div class="request">{{intval($item->amount) <= 0 ? "Agotado" : "<input type=\"text\" name=\"amount\"/><a href=\"#\" class=\"btn add-request\">Pedir</a>"}}</div>
				</div>
				<div class="picture">
					<img src="{{$item->image_url}}" />
				</div>
				
			</div>
		@endforeach

	@endif
</div>